package net.ssta.core.util.format;

import java.io.Reader;

import oracle.sql.CLOB;


public class OracleClobFormat extends ValueObjectFormat
{
	public String getString(Object value, String defaultValue)
	{
		if( value == null )
		{
			return defaultValue ;
		}

		try 
		{
			CLOB clob = (CLOB)value;
			Reader reader = clob.getCharacterStream();
			return getString(reader);
		}
		catch (Exception e) 
		{
			throw new RuntimeException(e);
		}
	}

}
